/*
   file : lock.h
   University of Jiangsu
   memoryDB      2010.6
 */


#ifndef _MMDB_LOCK_HEAD_H
#define _MMDB_LOCK_HEAD_H

#include"def_head.h" 
int Init_DB_lock();
int Init_tb_locklist();
int Free_table_lock();
int Free_DB_lock();

void Init_Table_lock(Table_lock *);
void Init_Table_lock_list(Table_lock_list *);

int Rlock_Cur_DB();
int Wlock_Cur_DB();
int Unlock_Cur_DB();
void Add_Table_lock(Table_lock *);
int Del_Table_lock(char *);
int Rlock_Table(char *);
int Wlock_Table(char *);
int Unlock_Table(char *);
void try_Unlock_Table(char *);

#endif
